<?php
/**
 * @version		$Id: multisites.php 26 2009-08-17 14:47:55Z naveen.gavini $
 * @package		Joomla
 * @subpackage	Joomla Multisite
 * @copyright	Copyright (C) 2009 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.model' );

/**
 * Multisite Model
 *
 * @package    Multisite
 * @subpackage Components
 */
class MultisitesModelMultisites extends JModel
{
	/**
	 * Multisites data array
	 *
	 * @var array
	 */
	var $_data;


	/**
	 * Returns the query
	 * @return string The query to be used to retrieve the rows from the database
	 */
	function _buildQuery()
	{
		$query = ' SELECT * FROM #__multisite ';

		return $query;
	}

	/**
	 * Retrieves the multisite data
	 * @return array Array of objects containing the data from the database
	 */
	function getData()
	{
		// Lets load the data if it doesn't already exist
		if (empty( $this->_data ))
		{
			$query = $this->_buildQuery();
			$this->_data = $this->_getList( $query );
		}

		return $this->_data;
	}
}